avatar_mod = {
    avatarCssId: 'avatarCSS',
    css: '.mod.avatarMod .body { padding: 0px; } .mod.avatarMod .body img { width: 218px !important; max-width: 218px !important; } #avatar div.action, .mod.avatarMod .action, .mod.homeInfo .action { top: 0px; right: 0px; }',
    init: function() {
        config_mod.onsaveconfig.add(this);

        var cfg = tuenti_lib.config.get();

        if (cfg.bigAvatar) this.enable();
    },
    enable: function() {
        if (!document.getElementById(this.avatarCssId))
            system_lib.addStyle(this.css, this.avatarCssId);
    },
    disable: function() {
        system_lib.removeStyle(this.avatarCssId);
    },
    onSaveConfig: function(cfg) {
        if (cfg.bigAvatar)
            this.enable();
        else
            this.disable();
    }
};

avatar_mod.init();